<?php
/**
 * @auther:周卫星
 * @date:2019/10/29
 * @fileName:detail.blade.php
 * @fileDesc: 查看商户详细信息
 */
?>

@extends('admin_layout.layer')
@section('title', '商户列表')
@push('css')
@endpush

@push('js')
    <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=b2033c035d0b707892bd52f2ad6b61e9&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.CitySearch"></script>
    <script src="{{ Illuminate\Support\Facades\URL::asset('js/common/global.js') }}"></script>
    <script src="{{ Illuminate\Support\Facades\URL::asset('js/common/common.js') }}"></script>
    <script src="{{ Illuminate\Support\Facades\URL::asset('js/admin/biz/biz_layer.js') }}"></script>
@endpush

@section('content')
    <div class="layui-tab">
        <ul class="layui-tab-title">
            <li class="layui-this">基础信息</li>
            <li>联系人信息</li>
            <li>企业信息</li>
            <li>当日营业额</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div class="layui-fluid">
                    <div>
                        <div style="margin-bottom: 5px; font-weight: bold">商户名称</div>
                        <div style="font-size: 16px">{{ $info['name'] }}</div>
                    </div>
                    <div>
                        <div style="margin: 15px 0 5px 0; font-weight: bold">商户分类</div>
                        <div style="font-size: 16px">{{ $info['category'] }}</div>
                    </div>
                    <div>
                        <div style="margin: 15px 0 5px 0; font-weight: bold">地址</div>
                        <div id="map" data-lat="{{ $info['latitude'] }}" data-lon="{{ $info['longitude'] }}" style="height: 300px; width: 50%"></div>
                    </div>
                    <div>
                        <div style="margin: 15px 0 5px 0; font-weight: bold">联系电话</div>
                        <div style="font-size: 16px">{{ $info['tel'] }}</div>
                    </div>
                    <div>
                        <div style="margin: 15px 0 5px 0; font-weight: bold">用户名</div>
                        <div style="font-size: 16px">{{ $info['username'] }}</div>
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-fluid">
                    <div>
                        <div style="margin-bottom: 5px; font-weight: bold">真实姓名</div>
                        <div style="font-size: 16px">{{ $info['truename'] }}</div>
                    </div>
                    <div>
                        <div style="margin: 15px 0 5px 0; font-weight: bold">身份证号码</div>
                        <div style="font-size: 16px">{{ $info['idcard'] }}</div>
                    </div>
                    <div>
                        <div style="margin: 15px 0 5px 0; font-weight: bold">身份证正面</div>
                        <div style="font-size: 16px"><img src="{{ $info['idfront'] }}" alt="" style="width: 50%"></div>
                    </div>
                    <div>
                        <div style="margin: 15px 0 5px 0; font-weight: bold">身份证背面</div>
                        <div style="font-size: 16px"><img src="{{ $info['idback'] }}" alt="" style="width: 50%"></div>
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-fluid">
                    <h1 style="margin-bottom: 20px">营业执照</h1>

                    <div style="margin-left: 20px">
                        <div>
                            <div style="margin-bottom: 5px; font-weight: bold">营业执照名称</div>
                            <div style="font-size: 16px">{{ $info['business_license_name'] }}</div>
                        </div>
                        <div>
                            <div style="margin: 15px 0 5px 0; font-weight: bold">营业执照注册号</div>
                            <div style="font-size: 16px">{{ $info['business_license_code'] }}</div>
                        </div>
                        <div>
                            <div style="margin: 15px 0 5px 0; font-weight: bold">营业执照注册地址</div>
                            <div style="font-size: 16px">{{ $info['business_license_address'] }}</div>
                        </div>
                        <div>
                            <div style="margin: 15px 0 5px 0; font-weight: bold">营业执照有效期</div>
                            <div style="font-size: 16px">{{ $info['business_license_expire'] }}</div>
                        </div>
                        <div>
                            <div style="margin: 15px 0 5px 0; font-weight: bold">营业执照照片</div>
                            <div style="font-size: 16px"><img src="{{ $info['business_license_image'] }}" alt="" style="width: 50%"></div>
                        </div>
                    </div>

                    <h1 style="margin-bottom: 20px">餐饮服务许可证</h1>
                    <div style="margin-left: 20px">
                        <div>
                            <div style="margin-bottom: 5px; font-weight: bold">许可证名称</div>
                            <div style="font-size: 16px">{{ $info['catering_service_license_name'] }}</div>
                        </div>
                        <div>
                            <div style="margin: 15px 0 5px 0; font-weight: bold">许可证编号</div>
                            <div style="font-size: 16px">{{ $info['catering_service_license_no'] }}</div>
                        </div>
                        <div>
                            <div style="margin: 15px 0 5px 0; font-weight: bold">许可证地址</div>
                            <div style="font-size: 16px">{{ $info['catering_service_license_address'] }}</div>
                        </div>
                        <div>
                            <div style="margin: 15px 0 5px 0; font-weight: bold">许可证到期时间</div>
                            <div style="font-size: 16px">{{ $info['catering_service_license_expire'] }}</div>
                        </div>
                        <div>
                            <div style="margin: 15px 0 5px 0; font-weight: bold">许可证照片</div>
                            <div style="font-size: 16px"><img src="{{ $info['catering_service_license_image'] }}" alt="" style="width: 50%"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-fluid">
                    <h1 style="margin-bottom: 20px">当日营业额</h1>
                    <form class="layui-form" onsubmit="return false;" id="serch_biz" action="{{ request() -> getRequestUri() }}">
                        <div class="layui-inline">
                            <input type="text" name="start" class="layui-input laydate" id="start" autocomplete="off">
                        </div>
                        <div class="layui-inline">
                            <input type="text" name="end" class="layui-input laydate" id="end" autocomplete="off">
                        </div>
                        <div class="layui-inline">
                            <button class="layui-btn" lay-submit lay-filter="getTotal">查询</button>
                        </div>
                    </form>
                    <ul>
                        <li id="wx_pay">微信支付:<span>{{ sprintf("%.2f", $wx_turnover) }}</span>元</li>
                        <li id="al_pay">支付宝支付:<span>{{ sprintf("%.2f", $ali_turnover) }}</span>元</li>
                        <li id="total">总计:<span>{{ sprintf("%.2f", $total) }}</span>元</li>
                        <li id="money_back">回款:<span>{{ sprintf("%.2f", $money_back) }}</span>元</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
@endsection
